package com.trmp.base.shoppingMng.dao.impl;



import java.util.ArrayList;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

public class ShoppingFeeInfoDaoImpl{
	@PersistenceContext
	private EntityManager em;
	
	public void deleteFeesByShoppingId(List<Long> list)
	{
		StringBuffer sb=new StringBuffer();
		sb.append("delete from T_SYS_CODEDESC t where ");
		List<String> Strings=new ArrayList<String>();
		for (Long long1 : list) {
			String s="t.CODETYPEID="+long1;
			Strings.add(s);
		}
		String temp= Strings.toString().replace(",", " or");
		sb.append(temp.substring(1, temp.length()-1));
		Query query= em.createNativeQuery(sb.toString());
		//query.executeUpdate();
		System.out.println(sb.toString());
		//em.flush();
	}

}
